package com.xtkj.fcsjgromoreads.mediation.java;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Nullable;

import android.widget.ImageView;
import android.widget.TextView;

//import com.bytedance.mtesttools.api.TTMediationTestTool;
import com.xtkj.fcsjgromoreads.R;
import com.xtkj.fcsjgromoreads.config.TTAdManagerHolder;

public class MediationMainActivity extends Activity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.mediation_activity_main);

        TextView tvVersion = findViewById(R.id.tv_version);
        String ver = getString(R.string.main_sdk_version_tip, TTAdManagerHolder.get().getSDKVersion());
        tvVersion.setText(ver);

        //信息流广告（单个）
        findViewById(R.id.btn_main_feed).setOnClickListener(v -> {
            Intent intent = new Intent(MediationMainActivity.this, MediationFeedActivity.class);
            startActivity(intent);
        });
        //信息流广告（ListView）
        findViewById(R.id.btn_main_feed_listview).setOnClickListener(v -> {
            Intent intent = new Intent(MediationMainActivity.this, MediationFeedListViewActivity.class);
            startActivity(intent);
        });
        //信息流广告（RecyclerView）
        findViewById(R.id.btn_main_feed_recyclerview).setOnClickListener(v -> {
            Intent intent = new Intent(MediationMainActivity.this, MediationFeedRecyclerViewActivity.class);
            startActivity(intent);
        });
        //Draw广告
        findViewById(R.id.btn_main_draw).setOnClickListener(v -> {
            Intent intent = new Intent(MediationMainActivity.this, MediationDrawActivity.class);
            startActivity(intent);
        });
        //Banner广告
        findViewById(R.id.btn_main_banner).setOnClickListener(v -> {
            Intent intent = new Intent(MediationMainActivity.this, MediationBannerActivity.class);
            startActivity(intent);
        });
        //开屏广告
        findViewById(R.id.btn_main_Splash).setOnClickListener(v -> {
            Intent intent = new Intent(MediationMainActivity.this, MediationSplashStartActivity.class);
            startActivity(intent);
        });
        //激励视频广告
        findViewById(R.id.btn_main_Reward).setOnClickListener(v -> {
            Intent intent = new Intent(MediationMainActivity.this, MediationRewardActivity.class);
            startActivity(intent);
        });
        //新插屏广告
        findViewById(R.id.btn_main_full_interaction).setOnClickListener(v -> {
            Intent intent = new Intent(MediationMainActivity.this, MediationInterstitialFullActivity.class);
            startActivity(intent);
        });

//        findViewById(R.id.btn_main_tool).setOnClickListener(v -> TTMediationTestTool.launchTestTools(MediationMainActivity.this, new TTMediationTestTool.ImageCallBack() {
//            @Override
//            public void loadImage(ImageView imageView, String s) {
//
//            }
//        }));
    }
}
